<?php

namespace App\Support\Singleton;

class SingletonInstanceMap
{

    /**
     * @param string $name
     * @return SingletonInstance
     */
    public function __get(string $name)
    {
        // TODO: Implement __get() method.
        if(! property_exists($this, $name)){
            exit("单例属性不存在");
        }
        return $this->{$name};
    }


    /**
     * @param string $name
     * @param $value
     */
    public function __set(string $name,  $value)
    {
        // TODO: Implement __set() method.
        $this->{$name} = $value;
    }

}
